package com.cancan.cloud.shop.feign;

import com.cancan.cloud.shop.domain.Product;
import com.cancan.cloud.shop.service.impl.RpcServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;


@Component
@FeignClient(value = "product-server", fallback = RpcServiceImpl.class)
public interface RpcService {

    /**
     * 查询test
     *
     * @param id
     * @return
     */
    @RequestMapping(value = "/api2", method = RequestMethod.GET)
    Product query(@RequestParam(value = "id") Long id);
}